<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
	<%
	StringBuffer strURL = request.getRequestURL();
	String URL = strURL.toString();
	String contPath = request.getContextPath();
	int nIndex = URL.indexOf(contPath);
	URL = "http://tugo.cn/weixin_aef/";
	%>
<html>

<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta content="always" name="referrer">
<meta charset="utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<!-- 移动端必须的设置 -->
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- 禁用电话号码检测功能，禁止对数字随便可以拨号 -->
<meta name="format-detection" content="telephone=no">
<!-- 禁用E-mail检测功能 -->
<meta name="format-detection" content="email=no">
<!-- 禁用地址检测功能，禁止跳转到地图 -->
<meta name="format-detection" content="address=no">
<!-- 在苹果设备上以全屏方式打开本网页 -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- 设置在苹果设备上状态的颜色，默认白色，要设置成什么颜色以Web颜F色的风格而定 -->
<meta name="apple-mobile-web-app-status-bar-style" content="white">
<link rel="stylesheet" href="<%=URL%>newedition/css/aui.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/iconfont.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/aui-slide.css" />
<link rel="stylesheet"
	href="<%=URL%>newedition/css/user_infoNotesDetails.css" />
<link rel="stylesheet"
	href="<%=URL%>newedition/css/aui-pull-refresh.css" />
<script type="text/javascript"
	src="<%=URL%>newedition/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/aui-slide.js"></script>
<script type="text/javascript" src="<%=URL%>js/base64.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/aui-toast.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/auipopupstyle.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/base.js?version=3.4"></script>
<script type="text/javascript"
	src="<%=URL%>js/cookies.js?version=1.1"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/aui-pull-refresh.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/doRefresh.js"></script>
<script type="text/javascript"
	src="<%=URL%>newedition/js/aui-dialog.js"></script>
<title>订单详情</title>
	</head>

	<body>
			<header class="aui-bar aui-bar-nav">
				<!-- <a class="aui-pull-left aui-btn">
					<span class="aui-iconfont aui-icon-left"></span>
				</a> -->
				<div class="aui-title">订单详情</div>
				<a class="aui-pull-right aui-btn">
					<span class="aui-iconfont aui-icon-more"></span>
				</a>
			</header>
		<div class="body-box aui-refresh-content">
			<div class="banner aui-margin-b-15">
				<div class="bannerTitle">
					<span>派送中...</span>
				</div>
				<img src="<%=URL%>newedition/img/user_infoNotesDetails_banner.png" />
			</div>
			<div class="content-list">
				<div class="main01 aui-margin-b-15">
					<span class="main-title aui-padded-5">订单信息</span>
					<div class="main-content">
						<div id="createdDt"></div>
						<div id="address"></div>
					</div>
				</div>
				<div class="main02 aui-margin-b-15">
					<span class="main-title aui-padded-5">订单信息</span>
					<div class="main-content">
						<div>
							<span id="recyclename">收油人员: 李四</span>
							<span id="comments" name="" class="main02-button" style="display: none;"  onclick="infoWorker()">查看</span>
						</div>
						<div id="recycleiphon">联系电话: 186******5323</div>
						<div>公司名称: 重庆阿尔发石油化工有限公司</div>
					</div>
				</div>
				<div class="main03 aui-margin-b-15 aui-padded-15">
					<div class="aui-row">
						<div class="aui-col-xs-6 main03-left">
							<div class="main03-title">
								<i class="icon iconfont icon-iconfuzhi"></i>
								<span>预收桶数</span>
							</div>
							<div>
								<span class="quantity" id="number1">12</span>
								<span>桶</span>
							</div>
						</div>
						<div class="aui-col-xs-6 main03-right">
							<div class="main03-title">
								<i class="icon iconfont icon-iconfuzhi" style="color: #ffda31;"></i>
								<span>实收桶数</span>
							</div>
							<div>
								<span class="quantity" id="number2">12</span>
								<span>桶</span>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="phone">

			<a href="tel:18883573989" id="phonerecycle"> 
				<i class="icon iconfont icon-dianhua" style="font-size: 70px;"></i></a>
			</div>
		</div>
	</body>

	<script>
		dorefresh();
	</script>
	<script type="text/javascript">
	<%String orderid = (String) request.getParameter("orderid");%>
	$(function() {
		findlist(getCookie("useriphone"), <%=orderid%>, 10)
	})
	function infoWorker(){
		var a=$("#comments").attr("name");
		location.href="user_infoWorker.jsp?phone="+a+"" 
		
	}
	function findlist(phone,orderid,roleId) {
		showDefault("loading","加载中...");
	var json = {
			"filterscount": "0",
			"groupscount": "0",
			"pagenum": "0",//页数
			"pagesize": "0",//条数
			"recordstartindex": "0",
			"recordendindex": "0",
			"roleId": "10",//角色id
			"phone": "18883753989",
			"iphone": "18883753989"
	}
	var jsonstr = "filterscount=0&groupscount=0&pagenum=0&pagesize=50&recordstartindex=0&recordendindex=50&roleId="+roleId+"&phone="+phone+"&iphone="+phone+"&orderid="+orderid+"";
	$.ajax({
		cache: false,
		type: "post",
		datatype: 'json',
		contentType: 'application/json;charset=UTF-8',
		data: jsonstr,
		url: ''+httpipstr+'alfa-mobile-ws/rest/order/findlist?mobiletoken='+getCookie("mobiletokenuser")+'',
		success: function(data) {
				if(data.total=="0"){
				}else{
					toast.hide();
					$.each(data.rows, function (n, value) {
						
						$("#createdDt").html("发布时间："+value.createdDt+"")
						$("#address").html("收油地址："+value.address+"")
						$("#number1").html((!value.num ||value.num=="undefined"? "0" : ""+value.num+""))
						$("#number2").html((!value.realnum ||value.realnum=="undefined"? "0" : ""+value.realnum+""))
						$("#recyclename").html((!value.realname ||value.realname=="undefined"? "联系人:" : "联系人:"+value.realname+""))
						$("#recycleiphon").html((!value.phone ||value.phone=="undefined"? "联系电话:" : "联系电话:"+value.phone+""))
						$("#comments").attr("name",value.phone);
						$("#phonerecycle").attr("href","tel:"+value.phone+"")
						if(value.orgstatus=="2"){
							$("#comments").show();
							$(".bannerTitle").find("span").html("派送中...")
						}else if(value.orgstatus=="3"){
							$("#comments").show();
							$(".bannerTitle").find("span").html("派送中...")
						}else if(value.orgstatus=="4"){
							$("#comments").show();
							$(".bannerTitle").find("span").html("已结束")
						}else if(value.orgstatus=="1"){
							$(".bannerTitle").find("span").html("派送中...")
						}
					})
				}
		}
	});
}
	</script>
</html>